<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        // 用户输入一个数，判断是奇数还是偶数
        var num = prompt('输入一个数字')
        if (num % 2 == 0) {
            alert('你输入的是偶数')
        } else {
            alert('你输入的是奇数')
        }
    </script>
</body>
</html>